Semantic mode is a global minor mode
for Semantic as a whole. When enabled, each file you visit
is automatically parsed, provided its major mode is specified in
the variable semantic-new-buffer-setup-functions
(the default value of this variable sets up parsing for all the
parsers included with Emacs, but you may add to it if you install
additional parsers).
In each parser-enabled buffer, a number of Semantic commands are available for navigating, querying, and editing source code. See Semantic mode user commands. Enabling Semantic mode also installs a ‘Development’ menu on the menu-bar, with many of these commands.
In addition, enabling Semantic mode turns on certain auxiliary
global minor modes. The variable
semantic-default-submodes determines which auxiliary
modes are enabled; the defaults are SemanticDB mode (see SemanticDB) and Global Semantic
Idle Scheduler mode (see Idle Scheduler). You can
also toggle the auxiliary minor modes separately, using their
mode functions (e.g. M-x semanticdb-minor-mode), or
via the ‘Development’ menu. The various
auxiliary minor modes are described in the following
sections.
The value of this variable is an alist of functions to call for setting up Semantic parsing in the buffer. Each element has the form
(mode.fn), where mode is a value ofmajor-modefor the buffer and fn is the corresponding function for setting up the parser. fn is called, with no arguments, after the major mode is initialized (and after the mode hooks have been run).The default value enables Semantic for all supported major modes (i.e., C, C++, Scheme, Javascript, Java, HTML, SRecode, and Make), but you can remove modes from this list if you don't want to use Semantic with them.
The value of this variable is a list of symbols, specifying the auxiliary minor modes to enable when enabling Semantic mode. The valid mode symbols are:
global-semantic-idle-scheduler-mode(see Idle Scheduler).global-semanticdb-minor-mode(see SemanticDB).global-semantic-idle-summary-mode(see Idle Summary Mode).global-semantic-idle-completions-mode(see Idle Completions Mode).global-semantic-highlight-func-mode(see Highlight Func Mode).global-semantic-decoration-mode(see Tag Decoration Mode).global-semantic-stickyfunc-mode(see Sticky Func Mode).global-semantic-mru-bookmark-mode(see MRU Bookmarks).